package me.zhengjie.modules.lock.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.zelk.smartlock.common.constant.Constant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel("门锁列表响应结果")
@Data
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public class LockDeviceInfoListDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "门锁的绑定ID", dataType = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long lockOwnerId;

    @ApiModelProperty(value = "门锁id", dataType = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long lockId;

    @ApiModelProperty(value = "门锁管理员-partnerid", dataType = "Long")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long partnerId;

    @ApiModelProperty(value = "门锁管理员名称", dataType = "String")
    private String partnerName;

    @ApiModelProperty(value = "门锁别名", dataType = "String")
    private String lockOwnerAlias;

    @ApiModelProperty(value = "MAC地址", dataType = "String")
    private String mac;

    @ApiModelProperty(value = "绑定时间")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    private LocalDateTime bindTime;

    @ApiModelProperty(value = "true：启用（默认），false：禁用")
    private Boolean enable;

    @ApiModelProperty(value = "门锁支持的卡类型（所有卡：all, m1：m1卡 cpu：cpu卡 identity：身份证卡 all：支持所有卡类型 no: 关闭读头）", dataType = "String")
    private String cardType;

    @ApiModelProperty(value = "键盘锁定时间")
    private Integer keyboardLockTime;

    @ApiModelProperty(value = "键盘锁定输入次数", dataType = "int")
    private Integer errorNum;

    @ApiModelProperty(value = "重置按照状态，true：开启，false关闭")
    private Boolean resetStatus;

    @ApiModelProperty(value = "自动闭锁时间")
    private Integer autoLockTime;

    @ApiModelProperty(value = "产品型号ID", dataType = "Integer")
    private Integer productId;
    @ApiModelProperty(value = "锁类型", dataType = "String")
    private String lockType;
    @ApiModelProperty(value = "密码容量")
    private Integer pwdNum;

    @ApiModelProperty(value = "有效密码数量")
    private Integer validPwdNum;

    @ApiModelProperty(value = "card 钥匙容量")
    private Integer cardNum;

    @ApiModelProperty(value = "有效卡容量")
    private Integer validCardNum;

    @ApiModelProperty(value = "指纹数量")
    private Integer fpNum;

    @ApiModelProperty(value = "有效指纹数量")
    private Integer validFpNum;

    @ApiModelProperty(value = "剩余电量百分比", dataType = "Integer")
    private Integer batteryPercentage;

    @ApiModelProperty(value = "ROM版本号", dataType = "String")
    private String romVersion;

    @ApiModelProperty(value = "dfu版本号", dataType = "String")
    private String dfuVersion;

    @ApiModelProperty(value = "读取锁信息时间", dataType = "DateTime")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    private LocalDateTime readTime;

    @ApiModelProperty(value = "锁内时间", dataType = "DateTime")
    @JsonFormat(pattern = Constant.DATA_FORMAT, timezone = Constant.TIME_ZONE)
    private LocalDateTime lockTime;

}
